package com.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@Accessors
@AllArgsConstructor
@NoArgsConstructor
public class TbOrder implements Serializable {
    /**
     * 订单id
     *
     * @mbg.generated
     */
    private String id;

    /**
     * 数量合计
     *
     * @mbg.generated
     */
    private Integer totalNum;

    /**
     * 金额合计
     *
     * @mbg.generated
     */
    private BigDecimal totalMoney;

    /**
     * 优惠金额
     *
     * @mbg.generated
     */
    private BigDecimal preMoney;

    /**
     * 邮费
     *
     * @mbg.generated
     */
    private BigDecimal postFee;

    /**
     * 实付金额
     *
     * @mbg.generated
     */
    private BigDecimal payMoney;

    /**
     * 支付类型，1、在线支付、0 货到付款
     *
     * @mbg.generated
     */
    private String payType;

    /**
     * 订单创建时间
     *
     * @mbg.generated
     */
    private Date createTime;

    /**
     * 订单更新时间
     *
     * @mbg.generated
     */
    private Date updateTime;

    /**
     * 付款时间
     *
     * @mbg.generated
     */
    private Date payTime;

    /**
     * 发货时间
     *
     * @mbg.generated
     */
    private Date consignTime;

    /**
     * 交易完成时间
     *
     * @mbg.generated
     */
    private Date endTime;

    /**
     * 交易关闭时间
     *
     * @mbg.generated
     */
    private Date closeTime;

    /**
     * 物流名称
     *
     * @mbg.generated
     */
    private String shippingName;

    /**
     * 物流单号
     *
     * @mbg.generated
     */
    private String shippingCode;

    /**
     * 用户名称
     *
     * @mbg.generated
     */
    private String username;

    /**
     * 买家留言
     *
     * @mbg.generated
     */
    private String buyerMessage;

    /**
     * 是否评价
     *
     * @mbg.generated
     */
    private String buyerRate;

    /**
     * 收货人
     *
     * @mbg.generated
     */
    private String receiverContact;

    /**
     * 收货人手机
     *
     * @mbg.generated
     */
    private String receiverMobile;

    /**
     * 收货人地址
     *
     * @mbg.generated
     */
    private String receiverAddress;

    /**
     * 交易流水号
     *
     * @mbg.generated
     */
    private String transactionId;

    /**
     * 订单状态,0:未完成,1:已完成，2：已退货
     *
     * @mbg.generated
     */
    private String orderStatus;

    /**
     * 支付状态,0:未支付，1：已支付，2：支付失败
     *
     * @mbg.generated
     */
    private String payStatus;

    /**
     * 发货状态,0:未发货，1：已发货，2：已收货
     *
     * @mbg.generated
     */
    private String consignStatus;


    public List<String> getCommodityids() {
        return commodityids;
    }

    public void setCommodityids(List<String> commodityids) {
        this.commodityids = commodityids;
    }

    /**
     * 选中的购物车ID
     */
    @TableField(exist = false)
    private List<String> commodityids;

    @TableField(exist = false)
    private String commodityid;

    /**
     * 是否删除
     *
     * @mbg.generated
     */
    private String isDelete;

    private static final long serialVersionUID = 1L;


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", totalNum=").append(totalNum);
        sb.append(", totalMoney=").append(totalMoney);
        sb.append(", preMoney=").append(preMoney);
        sb.append(", postFee=").append(postFee);
        sb.append(", payMoney=").append(payMoney);
        sb.append(", payType=").append(payType);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", payTime=").append(payTime);
        sb.append(", consignTime=").append(consignTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", closeTime=").append(closeTime);
        sb.append(", shippingName=").append(shippingName);
        sb.append(", shippingCode=").append(shippingCode);
        sb.append(", username=").append(username);
        sb.append(", buyerMessage=").append(buyerMessage);
        sb.append(", buyerRate=").append(buyerRate);
        sb.append(", receiverContact=").append(receiverContact);
        sb.append(", receiverMobile=").append(receiverMobile);
        sb.append(", receiverAddress=").append(receiverAddress);
        sb.append(", transactionId=").append(transactionId);
        sb.append(", orderStatus=").append(orderStatus);
        sb.append(", payStatus=").append(payStatus);
        sb.append(", consignStatus=").append(consignStatus);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}